home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog Special Edition 10
/
FreelogHS10.iso
/
Buzz
/
Buzz_Advanced_Pack.exe
/
{app}
/
Dev
/
Overloader - SuperDonut SongInf
/
songinfobase.h
< prev
next >
Wrap
C/C++ Source or Header
|
2001-11-06
|
2KB
|
49 lines
/////////////////////////////////////////////////////////////////
// Start of SongInfo OEB Stuff
/////////////////////////////////////////////////////////////////
// Use this set of routines for your songinfo machine
char myappdir[250];
class CSongInfoHandler {
public:
virtual void OpenSIDialog();
virtual char * GetSongInfoName();
virtual void GetTags(int tag_id, char *tagdata);
};
int library_loaded;
char *(__cdecl *oeblib_GetVersion)(void);
HWND (__cdecl *oeblib_GetMainBuzzWindow)(void);
void (__cdecl *oeblib_SetSongInfoMac)(CSongInfoHandler *);
CSongInfoHandler *(__cdecl *oeblib_GetSongInfoMac)(void);
void (__cdecl *oeblib_SetpCB)(void *);
void *(__cdecl *oeblib_GetpCB)(void);
void LoadOEBForSongInfo(HINSTANCE dllInst) {
char baba[256], baba2[256];
char thestrdata[200];
char *filen;
GetModuleFileName(dllInst,baba,256);
GetFullPathName(baba,256,baba2,&filen);
sprintf(filen,"\0");
sprintf(&baba2[(int)(strlen(baba2) - 2 - 12)],"\0");
sprintf(myappdir,baba2);
sprintf(thestrdata, "%s\\overloader extbuzz.dll", myappdir);
HMODULE h_dll=LoadLibrary(thestrdata);
if(h_dll==NULL) {
library_loaded = 0;
// Loading OEB failed
} else {
library_loaded = 1;
oeblib_GetVersion=(char *(__cdecl *)(void))GetProcAddress(h_dll,"OEBGetVersionText");
oeblib_SetSongInfoMac=(void (__cdecl *)(CSongInfoHandler *))GetProcAddress(h_dll,"OEBSetSongInfo");
oeblib_GetSongInfoMac=(CSongInfoHandler *(__cdecl *)(void))GetProcAddress(h_dll,"OEBGetSongInfo");
oeblib_GetMainBuzzWindow=(HWND (__cdecl *)(void))GetProcAddress(h_dll,"OEBGetMainBuzzWindow");
oeblib_SetpCB=(void (__cdecl *)(void *))GetProcAddress(h_dll,"OEBSetpCB");
oeblib_GetpCB=(void *(__cdecl *)(void))GetProcAddress(h_dll,"OEBGetpCB");
}
}
void OEBSongInfo_Unload() { if (library_loaded == 1) { oeblib_SetSongInfoMac(NULL); } }
void OEBSongInfo_Load(CSongInfoHandler *buf) { if (library_loaded == 1) { oeblib_SetSongInfoMac(buf); } }
HWND OEBSongInfo_GetBuzzWindow(void *pp) { HWND buf; if (library_loaded == 1) { oeblib_SetpCB(pp); buf = oeblib_GetMainBuzzWindow(); } else { buf = GetForegroundWindow(); } return buf; }
/////////////////////////////////////////////////////////////////
// End of SongInfo OEB Stuff
/////////////////////////////////////////////////////////////////